<?php
/*
	首页
*/

defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	$member=model('core/member')->detail($_SESSION['uid'],array('credit1','credit2','mobile','avatar','nickname'));
	$return['member']=$member;
	$return['post']=array('mobile'=>$member['mobile']?:'');
	$return['types']=$this->tousu_types;
	set_html('title','投诉建议');
	exi($return);
}
if($_RQ['op']=='submit'){
	$postdata=get_postdata();
	$data=array(
		'uniacid'=>$_SESSION['uniacid'],
		'mid'=>$_SESSION['uid'],
		'msg'=>$postdata['msg'],
		'images'=>ijson_encode($postdata['images']),
		'ordersn'=>$postdata['ordersn'],
		'mobile'=>$postdata['mobile'],
		'types'=>$postdata['types'],
		'createtime'=>TIMESTAMP,
	);
	pdo_insert('jy_ailiao_feedback',$data);
	exi('提交成功！','','goback');
}
	
?>